string_trim_right
This function truncates a specified number of characters from the right hand side of a string.
string string_trim_right(string the_string, uint count)
Parameters:
the_string
The string that will be extracted from.
count
The number of characters to remove.
Return value:
Returns the string with so many characters removed from the right.
Remarks:
If position is less than 1, the string is returned in its entirety. If position is greater than the string's length, a blank string will be returned.
Example:
void main()
{
alert("string_trim_right test", string_trim_right("Hello, I am a string!", 16)); //output should be Hello
}